package com.unis.iptv.service;

import com.unis.iptv.domain.Channel;

public class Test {
	public Object getObject(Vo v) {
		if (v.object.getClass().equals(Channel.class)) {
			Channel c = (Channel) v.object;
			c.setChannelName(getChannelName(v.regex, v.url));
			return c;
		}
		if (v.url != null) {
			return getObject(v);
		}
		return v;
	}
	
	class Vo {
		@SuppressWarnings("unused")
		private String url, regex, type;
		private Object object;
	}
	
	static String getChannelName(String regex, String url) {
		return "ddd";
	}
	
}
